package com.qf.controller;

import com.qf.pojo.Visitors;
import com.qf.pojo.resp.BaseResult;
import com.qf.service.impl.VisitorsServiceImpl;
import javassist.compiler.ast.Visitor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@CrossOrigin
@RestController
@RequestMapping("/visitors")
public class VisitorsController {

    @Autowired
    VisitorsServiceImpl visitorsService;

    @RequestMapping("/addVisitors")
    public BaseResult addVisitors(Visitors visitors){
        BaseResult baseResult = visitorsService.addVisitors(visitors);
        return baseResult;
    }
}
